<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./template.xhtml">
            <ui:define name="mainMenu">
                <ui:include src="mainMenu.xhtml"/>
            </ui:define>
            <ui:define name="navigation">
                <ui:include src="menu.xhtml">
                    <ui:param name="select" value="#{1}"/>
                </ui:include>
            </ui:define>
            <ui:define name="content">
                <h1>
                    <h:outputText value="#{bundle.PTitle}" />
                </h1>
                <h:form>
                    <h:panelGrid styleClass="panelGrid" columns="2" columnClasses="rightAlign, leftAlign">
                        <h:outputText value="#{bundle.PName}"/>
                        <h:inputText id="name" maxlength="20"
                                     label="#{bundle.PName}"
                                     value="#{profileBean.user.firstName}">                            
                        </h:inputText>

                        <h:outputText value="#{bundle.PSurname}"/>
                        <h:inputText id="Suranme" maxlength="25"
                                     label="#{bundle.PSurname}"
                                     value="#{profileBean.user.lastName}"/>

                        <h:outputText value="#{bundle.PEmail}"/>
                        <h:inputText id="email" maxlength="45"
                                     label="#{bundle.PEmail}"
                                     value="#{profileBean.user.email}"/>                                              

                        
                        <h:panelGroup></h:panelGroup>
                        <h:commandButton value="#{bundle.Submit}" action="#{profileBean.editProfile}"/>
                    </h:panelGrid>
                    <h:messages styleClass="errorMsg" > </h:messages>

                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>